<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2019/5/31
 * Time: 15:13
 */

namespace app\common\validate;
use think\Validate;
class AdminUser extends Validate
{
    protected $rule =   [
        'username'  => 'require|unique:admin_user|min:4|max:16',
        'password'  => 'require|min:6|max:16',

    ];

    protected $message  =   [
        'username.require' => '请填写用户名称必须',
        'username.unique' => '请勿重复添加用户名',
        'username.min' => '用户名最少4个字符',
        'username.max' => '用户名最多16个字符',
        'password.require' => '请填写用户名密码',
        'password.min' => '用户名密码最少6个字符',
        'password.max' => '用户名密码最多16个字符',
    ];
}